package com.aquan.map_jetpack.ui.screens


import androidx.compose.foundation.layout.Box
import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.material.Button
import androidx.compose.material.Text
import androidx.compose.runtime.Composable
import androidx.compose.runtime.saveable.rememberSaveableStateHolder
import androidx.compose.ui.Modifier
import androidx.compose.ui.graphics.Color
import com.aquan.map_jetpack.ui.components.TopAppBar
import com.aquan.map_jetpack.ui.components.map_component.MapTest
import com.aquan.map_jetpack.ui.components.map_component.MapViewPage
import com.aquan.map_jetpack.ui.components.map_component.MapViewWidget


@Composable
fun HomeScreen() {
//    val save = rememberSaveableStateHolder()

    Box(modifier = Modifier.fillMaxSize()) {
        Column(modifier = Modifier.fillMaxSize()) {
//            TopAppBar() {
//                Text(text = "首页", color = Color(0xFFFFFFFF))
//            }

            // 引入地图
//            save.SaveableStateProvider(true) {
//                MapViewPage()
            MapTest()
//            }

        }
    }
}


@Composable
fun MapViewCom(
    modifier: Modifier = Modifier
) {
    // 初始化进入的token
    Button(
        onClick = {
//            findNavController().navigate(R.id.mapView)
        },
    ) {
        Text(text = "进入地图")
    }
}


